<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/SuperSubsidy',
    'namespace' => 'Beerus\\Modules\\SuperSubsidy\\Controllers',
    'middleware' => ['web', 'admin'],
], function (Router $router) {
    $router->get('/', function () {
        return redirect('/admin/SuperSubsidy/index');
    });

    //账户
    $router->get('/brand/accountList', 'SubsidyBrandController@accountList');
    $router->get('/brand/accountList/create', 'SubsidyBrandController@accountCreate');
    $router->post('/brand/accountList/saveAccount', 'SubsidyBrandController@saveAccount');
    $router->get('/brand/accountList/{id}/brandInfo', 'SubsidyBrandController@brandInfo');
    $router->get('/brand/accountList/exportBrandInfo', 'SubsidyBrandController@exportBrandInfo');

    //item 商品
    $router->get('/brand/itemList', 'SubsidyBrandItemsController@itemList');
    $router->get('/brand/itemList/create', 'SubsidyBrandItemsController@itemEdit');
    $router->get('/brand/itemList/{id}/edit', 'SubsidyBrandItemsController@itemEdit');
    $router->post('/brand/itemList/itemSave', 'SubsidyBrandItemsController@itemSave');
    $router->get('/brand/itemList/getGoodsTemplate', 'SubsidyBrandItemsController@getGoodsTemplate');
    $router->get('/brand/itemList/upload', 'SubsidyBrandItemsController@upload');
    $router->post('/brand/itemList/batchAdd', 'SubsidyBrandItemsController@batchAdd');

    //spu 商品
    $router->get('/brand/goodsList', 'SubsidyBrandGoodsController@goodsList');
    $router->get('/brand/goodsList/{id}/detail', 'SubsidyBrandGoodsController@goodsDetail');
    $router->post('/brand/goodsList/{id}/changed', 'SubsidyBrandGoodsController@changed');
    $router->post('/brand/goodsList/{id}/release', 'SubsidyBrandGoodsController@release');
    $router->get('/brand/goodsList/{id}/exportItem', 'SubsidyBrandGoodsController@exportItem');

    //订单
    $router->get('/brand/orderList', 'SubsidyBrandOrderController@orderList');
    $router->get('/brand/orderList/export', 'SubsidyBrandOrderController@orderExport');
    $router->post('/brand/orderList/reload', 'SubsidyBrandOrderController@reloadOrder');
    $router->get('/brand/orderList/create', 'SubsidyBrandOrderController@orderCreate');
    $router->post('/brand/orderList/postCreate', 'SubsidyBrandOrderController@postCreate');

    //发货记录
    $router->get('/brand/deliverList', 'SubsidyBrandDeliverController@deliverList');
    $router->get('/brand/deliverList/export', 'SubsidyBrandDeliverController@deliverExport');
    $router->post('/brand/deliverList/handleDeliver', 'SubsidyBrandDeliverController@handleDeliver');


    //住友津贴-好好住超级补贴日活动商品上传
    $router->get('/superSubsidyDay/goods', 'SuperSubsidyDayGoodsController@index');
    $router->get('/superSubsidyDay/goods/excel', 'SuperSubsidyDayGoodsController@indexExcel');
    $router->post('/superSubsidyDay/goods/save', 'SuperSubsidyDayGoodsController@save');

    $router->get('/superSubsidyDay/goods/{v}', 'SuperSubsidyDayGoodsController@indexV');
    $router->get('/superSubsidyDay/goods/{v}/excel', 'SuperSubsidyDayGoodsController@indexVExcel');
    $router->post('/superSubsidyDay/goods/save/{v}', 'SuperSubsidyDayGoodsController@saveV');

});